# -*- coding: utf-8 -*-
"""
Created on Sun Sep  8 16:40:09 2019

@author: ASUS
"""
import math
x = input('输入两边长及夹角(度):')
a,b,theta = map(float,x.split())#以空格为分隔符，包含 \n  序列解包
c = math.sqrt(a**2+b**2-2**a*a*b*math.cos(theta*math.pi/180))
print('c=',c)